package db;

// Admin.java
// Represents a bank employee

public class Admin {

	private int cpr; // employee CPR
	private int loginId; // employee loginId
	private int password; // employee password
	private String firstName; // employee first name
	private String lastName; // employee last name

	// Admin constructor initializes attributes
	public Admin(int theLoginId, int thePassword, String theFirstName,
			String theLastName, int theCpr) {
		loginId = theLoginId;
		firstName = theFirstName;
		lastName = theLastName;
		cpr = theCpr;
		password = thePassword;
	} // end Admin constructor

	// determines whether a user-specified Password matches Password in Admins table
	public boolean validatePassword(int userPassword) {
		if (userPassword == password)
			return true;
		else
			return false;
	} // end method validatePassword

	// returns employee firstname
	public String getFirstName() {
		return firstName;
	} // end getFirstName

	// returns employee lastname
	public String getLastName() {
		return lastName;
	} // end getLastName

	// returns employee CPR
	public int getCpr() {
		return cpr;
	} // end getCpr

	// returns employee loginId
	public int getLoginId() {
		return loginId;
	} // end method getAccountNumber

	// returns employee PIN
	public int getPin() {
		return password;
	} // end method getPin

}